package cn.mccraft.uide.api.file;

import java.nio.file.Path;
import java.util.regex.Pattern;

@FunctionalInterface
public interface FileTypeFilter {
	
	boolean filter(Path path);

	static FileTypeFilter createFromPattern(Pattern pattern) {
		return path->pattern.matcher(path.getFileName().toString()).matches();
	}
}
